/**
 * Created by zixinhmc on 2016/9/10.
 */
console.log('-------------------------')
console.log('test3')

let person = {
    name: '张三'
}

var proxy = new Proxy(person, {
    get: function(target, property){
        if(property in target){
            return target[property]
        }else{
            throw new ReferenceError('Property \'' + property +  '\' does not exist. ')
        }
    }
})

console.log(proxy.name)
// console.log(proxy.age)